package cn.xuguowen.user.designPatten.template.prod;

import cn.xuguowen.bean.Result;
import io.swagger.annotations.Api;

/**
 * ClassName: Client
 * Package: cn.xuguowen.user.designPatten.template.prod
 * Description:
 *
 * @Author 徐国文
 * @Create 2023/4/25 9:26
 * @Version 1.0
 */
public class Client {
    public static void main(String[] args) {
        ApiTemplate apiTemplate = new ApiTemplate();
        Result result = Result.ok();
        apiTemplate.execute(result, new Action() {
            @Override
            public void validate() {
                System.out.println("开始参数校验");
            }

            @Override
            public void execute() {
                System.out.println("开始执行程序");
            }

            @Override
            public void after() {
                System.out.println("程序执行完成");

            }
        });
        System.out.println(result);
    }
}
